home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / a_to_d / clipbrd / tec_info.txt < prev   
Encoding:
Text File  |  1996-09-15  |  4.2 KB  |  159 lines

  1.                ABOUT THESE COMPONENTS
  2.  
  3. This component set was born because of the difficulty of coding
  4. generic cut copy and paste routines that work with dbGrids 
  5. stringGrids and even dbImages. Especially in Delphi 1.0.
  6.  It also fixes the bug in 1.0 dbImages that causes a GPF if you 
  7. try to cut an image to the clipboard when the Stretch property is true.
  8.  
  9. ====================================
  10.  
  11. TcwClpBoardButton
  12.  
  13. ====================================
  14.  
  15. The TcwClpBoardButton encapsulates all the necessary code 
  16. for Cutting, copying or pasting within its click method. No code 
  17. needed!
  18.  
  19. New Method
  20.  setEnabledState
  21.  
  22. It has a 'setEnabledState' method that with just a couple
  23. of lines of code makes their Enabled state Data Aware.
  24. See the Demo code for the "onIdle" event.
  25.  
  26. New property
  27.  
  28. Kind
  29.  
  30. Kind has 3 values
  31.  bkCut   - The default
  32.  bkCopy
  33.  bkPaste
  34.  
  35. Setting this property is all you have to do to turn it into the 
  36. appropriate type of button including setting the correct
  37. BITMAP and HINT.
  38.  
  39. ==================================
  40.  
  41. TcwClpBoardBar
  42.  
  43. ==================================
  44.  
  45. This is a descendant of TcwToolBar (See Below)
  46. It is a TcwToolBar with three cwClpBoardButtons encapsulated
  47. as Cut Copy and Paste buttons.
  48.  
  49. Using this composite component will ensure a conforming
  50. appearance across all forms without needing precise GUI
  51. manipulation.
  52.  
  53. It inherits all the neat features of the TcwToolBar and by 
  54. increasing its width you can add additional buttons that
  55. will also be manipulated as in the TcwToolBar.
  56.  
  57. New Method
  58.  
  59. setEnabledState
  60.  
  61.  This method controls the setEnabledState of all 3 encapsulated
  62.  TcwClpBoardButtons.
  63.  
  64.  
  65. ===================================
  66.  
  67. TcwToolBar
  68.  
  69. ===================================
  70.  
  71. This is a descendent ot TPanel that knows how to:-
  72.  
  73. 1. Resize any components it contains when IT is resized. You can
  74.     also use this ability to make sure all components dropped onto
  75.     the toolBar are the correct height and precisely aligned.
  76.  
  77.    By dropping bevel components onto the toolbar and setting
  78.    their visible property to FALSE you can create spacers to
  79.    seperate different logical groups of buttons.
  80.  
  81.      It uses the values of 2 new properties
  82.  
  83.    AutoSizeButtons - Turn on/Off autoSizing
  84.  
  85.   KeepSquare - Turn on/Off keeping buttons square when 
  86. autoSized
  87.  
  88. 2. Set its orientation to Horizontal or Vertical through a new
  89.     Property
  90.  
  91.    Orientation
  92.      Values
  93.        toHorizontal
  94.        toVertical.
  95.  
  96.   When the Orientation is changed the component knows how
  97.    to reset any components it contains to a horizontal set or a
  98.    vertical set.
  99.    NOTE : Components that are not approximately square may be
  100.                truncated if orientation is changed. (e.g. Drop down combo)
  101.  
  102. 3. Dock itself to Top, Left, Top, Bottom or None.
  103.     It automatically takes care of reAligning any buttons it contains
  104.     appropriately.
  105.  
  106.   Property
  107.  
  108.   Dock
  109.    Values
  110.     tdTop
  111.     tdLeft
  112.     tdBottom
  113.     tdRight
  114.     tdNone  -  Default
  115.      
  116. ===========================
  117.  
  118. HINTS ON USE
  119.  
  120. TcwClpBoardButton
  121.  
  122. Use it as a non visual object (Visible = False) to easily enable
  123. Menu items with one line of code.
  124.  
  125. 1. give the button a descriptive name e.g. butCut
  126. 2. In the Menu event handler use butCut.Click;
  127.  
  128. If you set the menu item shortCut key to Ctrl-X you will
  129.  get the added benefit of having the component code
  130.  respond instead of windows native behaviour. This
  131.  avoids the dbImage cutToClipboard GPF problem.
  132.  
  133. You can also handle Shift-Delete but that has to be done
  134. on each dbImage component in the KeyDown event
  135.  
  136. procedure 
  137. TForm1.DBImage1KeyDown(Sender: 
  138.                     TObject; var Key: Word;  Shift: TShiftState);
  139. begin
  140.  if (shift = [ssShift]) and ( Key = VK_Delete) then begin
  141.    Key := 0; {Prevent windows from seeing it}
  142.    butCut.Click;
  143.  end;
  144. end;
  145.  
  146. ============================
  147. Additional Files
  148.  
  149. TBAR.RES contains the bitMaps for the 3 buttons.
  150.  
  151. TBAR1.DCR contains the icons for the components.
  152.  
  153. ==============================
  154.  
  155. Known Problems
  156.  
  157. 1. Does not support all 3 rd Party Grids. Contact us for specific
  158.    information and additional modules with alternate code.
  159.